<!-- 批次库存查询 - 综合表单页面 -->
<template>
  <div class="page-container">
    <ex_super_table_page v-bind="option" ref="SuperTablePage">
    </ex_super_table_page>
  </div>
</template>
<script>
import { mapState } from "vuex";

export default {
  title: "title_detail_stock_query",
  components: {},
  data() {
    return {



      option: {
        search: {
          model: [
            { label: "label_customer", key: "customerId", type: 'common_customer_choose', },
            { label: "label_sku", key: "skuId", type: 'sku_selec_input', },
            { label: "label_warehouse_location ", key: "locationCode", type: 'input', },
            { label: "label_inbound_code", key: "putawayOrderNo", type: 'input', },
            { label: "label_business_type", key: "bizType", type: 'select', enum: 'BizTypeEnum' },
          ],
        },
        action: [],

        table: {
          url: "/oms-api/stock/OmsStockQueryRpc/stockContainerQuery.json",
          attrs: {},
          model: [
            {
              key: 'warehouseId', label: 'label_warehouse',  align: 'left', 'width': 150,
              attrs: {
                formatter: (r, c, v, i) => this.$formatNameCode(this.allWarehouseMap[v].name, this.allWarehouseMap[v].code)

              }
            },
            {
              key: 'locationCode', label: 'label_warehouse_location', align: 'left',  'width': 150,'show-overflow-tooltip':true,
            },
            {
              key: 'batchNo', label: 'label_batch_code',  align: 'left', 'width': 150,
              render: (h, { row, column }) => this.$renderText(h, row[column.property])
            },
            {
              key: 'customerCode', label: 'label_customer_info', align: 'left', 'width': 150,
              attrs: {
                formatter: (r, c, v, i) => this.$formatNameCode(r.customerName, r.customerCode)
              }
            },
            {
              key: 'skuOnlyCode', label: 'label_sku_only_code', align: 'left',  'min-width': 150,
              attrs: {
                formatter: (r, c, v, i) => r.skuId < 0 ? "——" : v
              }
            },
            {
              key: 'skuBarcode', label: 'label_sku_code', align: 'left',  'width': 150,
              attrs: {
                formatter: (r, c, v, i) => r.skuId < 0 ? "——" : v
              }
            },
            {
              key: 'skuName', label: 'label_sku_name_cn', align: 'left',  'width': 150,
              attrs: {
                formatter: (r, c, v, i) => r.skuId < 0 ? "——" : v
              }
            },
            {
              key: 'skuNameEn', label: 'label_sku_name_en', align: 'left',  'width': 150,
              attrs: {
                formatter: (r, c, v, i) => r.skuId < 0 ? "——" : v
              }
            },
            {
              key: 'bizType', label: 'label_business_type', 'width': 120, 'show-overflow-tooltip': true,
              formatter: (r, c, v, i) => this.$enumShow(v, "BizTypeEnum")
            },
            {
              key: 'freezeQty', label: 'label_frozen_count', 'width': 100,
            },
            {
              key: 'lockQty', label: 'label_lock_count', 'width': 100,
            },
            {
              key: 'usableQty', label: 'label_usable_count', 'width': 100,
            },
            {
              key: 'totalQty', label: 'label_sum', 'width': 100,
            },
            {
              key: 'putawayOrderNo', label: 'label_inbound_code',align: 'left', 'min-width': 150,
            },
            {
              key: 'putawayTime', label: 'label_inbound_time', 'width': 150,
              attrs: {
                formatter: (r, c, v, i) => { return this.$dateFormat(v) }
              }
            },
            {
              key: 'skuDeclaredValue', label: 'label_declared_value', 'width': 110,
            },
            {
              key: 'isInsurance', label: 'label_is_insurance', 'width': 110,
              attrs: {
                formatter: (r, c, v, i) => { return this.$enumShow(v, 'YesOrNoEnum') }
              }
            },
            {
              key: 'skuInsuranceAmount', label: 'label_sku_insurance_amount', 'width': 110,
            },
            {
              key: 'currencyCode ', label: 'label_currency_kind', 'width': 110,
            },
          ],

        }
        ,

      },


    };
  },
  computed: {
    ...mapState({ allWarehouseMap: state => state.allWarehouseMap }),
  },
  methods: {
  }
};

</script>
<style></style>
